﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="CreateUserAccount.aspx.vb" Inherits="Training.CreateUserAccount" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Training:: Create Account</title>
<link rel="Stylesheet" type="text/css" media="screen" href="css/publicStyle.css" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="ctr">
        <h2>Online Training</h2>
        
        <b>Welcome Group User, 
        <asp:LoginName ID="LoginName1" runat="server" /></b>
        <br />
        You will need to create an individual User account to continue<br />
        Use the form below.
        <br /><br />
        <asp:Label ID="lblAlert" runat="server" Text="" CssClass="Alert"></asp:Label>
        <br />
        <div class="lefty" style="width:660px;margin: 0 auto;">
            <div class="row">
                <div class="half">
                    First Name:<asp:RequiredFieldValidator ID="rfFname" runat="server"
                        ErrorMessage="required" ControlToValidate="tbFname" 
                        CssClass="small" Display="Dynamic"></asp:RequiredFieldValidator><br />
                    <asp:TextBox ID="tbFname" CssClass="formfield" Width="200px" 
                        runat="server"></asp:TextBox>
                </div>
                <div class="half">
                    Last Name:<asp:RequiredFieldValidator ID="rfLname" runat="server"
                        ErrorMessage="required" ControlToValidate="tbLname" 
                        CssClass="small" Display="Dynamic"></asp:RequiredFieldValidator><br />
                    <asp:TextBox ID="tbLname" CssClass="formfield" Width="200px" 
                        runat="server"></asp:TextBox>
                </div>
                <div class="clr"></div>
            </div>
            
            <div class="row">
                <div class="half">
                    Company/Site:<asp:RequiredFieldValidator ID="rfCompany" runat="server"
                        ErrorMessage="required" ControlToValidate="tbComp" 
                        CssClass="small" Display="Dynamic"></asp:RequiredFieldValidator><br />
                    <asp:TextBox ID="tbComp" CssClass="formfield" Width="200px" runat="server"></asp:TextBox>
                </div>
                <div class="half">
                    Address:<br />
                    <asp:TextBox ID="tbAdr" CssClass="formfield" Width="200px" runat="server"></asp:TextBox>
                </div>
            </div>
            
            <div class="row">
                <div class="half">
                    City:<br />
                    <asp:TextBox ID="tbCity" CssClass="formfield" Width="200px" runat="server"></asp:TextBox>
                </div>
                <div class="half">
                    State:<br />
                    <asp:DropDownList ID="ddlState" runat="server" AppendDataBoundItems="True" 
                        DataSourceID="dsStates" DataTextField="StateName" 
                        DataValueField="StateId" CssClass="formfield">
                        <asp:ListItem Value="-1" Text="-select-"></asp:ListItem>
                    </asp:DropDownList>
                </div>
            </div>
            
            <div class="row">
                <div class="half">
                    Zip:<asp:RequiredFieldValidator ID="rfZip" runat="server"
                        ErrorMessage="required" ControlToValidate="tbZip" 
                        CssClass="small" Display="Dynamic"></asp:RequiredFieldValidator><br />
                    <asp:TextBox ID="tbZip" CssClass="formfield" Width="200px" runat="server"></asp:TextBox>
                </div>
                <div class="half">
                    Phone:<asp:RequiredFieldValidator ID="rfPhone" runat="server"
                        ErrorMessage="required" ControlToValidate="tbPhone" 
                        CssClass="small" Display="Dynamic"></asp:RequiredFieldValidator><br />
                    <asp:TextBox ID="tbPhone" CssClass="formfield" Width="200px" runat="server"></asp:TextBox>
                </div>
            </div>
            
            <div class="row">
                <div class="half">
                    Login Name: 
                    <asp:RequiredFieldValidator ID="rfLogin" runat="server" ErrorMessage="required" 
                        ControlToValidate="tbLogin" CssClass="small" Display="Dynamic"></asp:RequiredFieldValidator><br />
                    <asp:TextBox ID="tbLogin" CssClass="formfield" Width="200px" 
                        runat="server"></asp:TextBox>
                </div>
                <div class="half">
                    Site Code:<br />
                    <asp:TextBox ID="tbSiteCode" CssClass="formfield" Width="200px" 
                        runat="server" ValidationGroup="info"></asp:TextBox><br />
                    <span class="small">(if applicable)</span></div>
                <div class="clr"></div>
            </div>
            
            
            <div class="row">
                <div class="half">
                    Password*: 
                    <asp:RequiredFieldValidator ID="rfPass" runat="server" ErrorMessage="required" 
                        ControlToValidate="tbPass" CssClass="small" Display="Dynamic"></asp:RequiredFieldValidator><br />
                    
                    <asp:TextBox ID="tbPass" CssClass="formfield" Width="200px" 
                        runat="server" TextMode="Password"></asp:TextBox>
                    
                    
                    <cc1:PasswordStrength ID="tbPass_PasswordStrength" runat="server" 
                        Enabled="True" TargetControlID="tbPass" MinimumNumericCharacters="0" 
                        MinimumSymbolCharacters="0" 
                        MinimumUpperCaseCharacters="0" 
                        MinimumLowerCaseCharacters="0" 
                        PreferredPasswordLength="6" DisplayPosition="LeftSide">
                    </cc1:PasswordStrength>
                    
                    
                </div>
                <div class="half">
                    Confirm Password: 
                    <asp:RequiredFieldValidator ID="rfPConf" runat="server" ErrorMessage="required" 
                        ControlToValidate="tbPConf" CssClass="small" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="cvPassword" runat="server" ControlToCompare="tbPass" 
                        ControlToValidate="tbPConf" CssClass="small" Display="Dynamic" 
                        ErrorMessage="passwords do not match"></asp:CompareValidator>
                    <br />
                    <asp:TextBox ID="tbPConf" CssClass="formfield" Width="200px" 
                        runat="server" TextMode="Password"></asp:TextBox>
                </div>
                <div class="clr"></div>
            </div>
            
            <div class="row">
                <div class="half">
                    Email: 
                    <asp:RequiredFieldValidator ID="rfEmail" runat="server" ErrorMessage="required" 
                        ControlToValidate="tbEmail" CssClass="small" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="reEmail" runat="server" 
                        ControlToValidate="tbEmail" CssClass="small" Display="Dynamic" 
                        ErrorMessage="invalid email" 
                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                    <br />
                    <asp:TextBox ID="tbEmail" CssClass="formfield" Width="200px" 
                        runat="server"></asp:TextBox>
                </div>
                <div class="half">
                    Confirm Email: 
                    <asp:RequiredFieldValidator ID="rfEConf" runat="server" ErrorMessage="required" 
                        ControlToValidate="tbEConf" CssClass="small" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="cvEmail" runat="server" ControlToCompare="tbEmail" 
                        ControlToValidate="tbEConf" CssClass="small" Display="Dynamic" 
                        ErrorMessage="email does not match"></asp:CompareValidator>
                    <br />
                    <asp:TextBox ID="tbEConf" CssClass="formfield" Width="200px" 
                        runat="server"></asp:TextBox>
                </div>
                <div class="clr"></div>
            </div>
        </div>
        <p class="small">(* Password requires 6 characters)</p>
        
        <asp:Button ID="btnCreateLogin" runat="server" Text="Create Login" CssClass="button" />
        
        <br /><br />
        <asp:LoginStatus ID="LoginStatus2" OnLoggedOut="LoginStatus2_LoggedOut" 
            LogoutAction="RedirectToLoginPage" runat="server" />
    </div>
    
    <asp:SqlDataSource ID="dsStates" runat="server" 
        ConnectionString="<%$ ConnectionStrings:Conn %>" 
        SelectCommand="SELECT [StateId], [StateName] FROM [States] ORDER BY [StateName]"></asp:SqlDataSource>
    </form>
</body>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8222027-2");
pageTracker._trackPageview();
} catch(err) {}</script>
</html>
